package net.wantongtech.xa.uploadbasicinfo.vo.migrate;

import com.wtkj.dao.annotation.DatabaseTable;
import com.wtkj.dao.annotation.PrimaryKey;
import com.wtkj.vo.AbstractValueObject;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

/**
 * 数据迁移日志实体
 *
 * @author MaShibo
 * 2021/3/10 0010
 */
@Data
@EqualsAndHashCode(callSuper = false)
@DatabaseTable(tableName = "TMP_MIGRATE_LOG")
public class MigrateDataLog extends AbstractValueObject {

    /**
     * 迁移数据类型：tr_portal_transout表
     */
    public static final int TYPE_PORTAL_TRANS_OUT = 1;

    /**
     * 迁移数据类型：tr_integrated_transout表
     */
    public static final int TYPE_INTEGRATED_TRANS_OUT = 2;

    /**
     * 同步成功
     */
    public static final int STATE_SUCCESS = 1;

    /**
     * 未同步
     */
    public static final int STATE_NONE = 0;

    @PrimaryKey
    private String logId;

    private Integer type;

    /**
     * 分区名称
     */
    private String partitionName;

    private Integer dataCount;

    /**
     * 数据所属日期
     */
    private Date belongDate;

    /**
     * 目标数据表名称
     */
    private String targetTable;

    private Date createTime;

    /**
     * 耗费时间：ms
     */
    private Long takeTime;

    /**
     * 0-未同步  1-同步成功
     */
    private Integer state;
}
